import Vue from 'vue';
import VueRouter from 'vue-router';
// import Baoxiao from '../views/Baoxiao.vue';

Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    name: 'Baoxiao',
    // component: Baoxiao,
    component: () => import(/* webpackChunkName: "baoxiao" */ '../views/Baoxiao.vue'),
    meta:{
      // 页面标题title
      title: '我的报销'
    }
  },
  {
    path: '/hesuan',
    name: 'Hesuan',
    // route level code-splitting
    // this generates a separate chunk (hesuan.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "hesuan" */ '../views/Hesuan.vue'),
    meta:{
      // 页面标题title
      title: '我的核算'
    }
  },
  {
    path: '/yiyi',
    name: 'Yiyi',
    component: () => import(/* webpackChunkName: "yiyi" */ '../views/Yiyi.vue'),
    meta:{
      // 页面标题title
      title: '我的异议'
    }
  },
  {
    path: '/yiyidetail',
    name: 'YiyiDetail',
    component: () => import(/* webpackChunkName: "yiyidetail" */ '../views/YiyiDetail.vue'),
    meta:{
      // 页面标题title
      title: '财务对话'
    }
  },
  {
    path: '/checkhesuan',
    name: 'CheckHesuan',
    component: () => import(/* webpackChunkName: "checkhesuan" */ '../views/CheckHesuan.vue'),
    meta:{
      // 页面标题title
      title: '查看核算'
    }
  },
  {
    path: '/singleyiyi',
    name: 'SingleYiyi',
    component: () => import(/* webpackChunkName: "singleyiyi" */ '../views/SingleYiyi.vue'),
    meta:{
      // 页面标题title
      title: '单据异议'
    }
  },
  {
    path: '/baoxiaoinput',
    name: 'BaoxiaoInput',
    component: () => import(/* webpackChunkName: "baoxiaoinput" */ '../views/BaoxiaoInput.vue'),
    meta:{
      // 页面标题title
      title: '单据信息录入'
    }
  },
  {
    path: '/billupload',
    name: 'BillUpload',
    component: () => import(/* webpackChunkName: "billupload" */ '../views/BillUpload.vue'),
    meta:{
      // 页面标题title
      title: '报销凭证录入'
    }
  },
  {
    path: '/billedit',
    name: 'BillEdit',
    component: () => import(/* webpackChunkName: "billedit" */ '../views/BillEdit.vue'),
    meta:{
      // 页面标题title
      title: '发票编辑'
    }
  },
  {
    path: '/billcheck',
    name: 'BillCheck',
    component: () => import(/* webpackChunkName: "billcheck" */ '../views/BillCheck.vue'),
    meta:{
      // 页面标题title
      title: '报销单据查看'
    }
  },
];

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes,
});

export default router;
